package com.yfqy.app.constant;

public class RedisKeyConstants {

    /**
     * 用户权限code缓存
     */
    public static final String SYS_USER_TOKEN = "system:user:id:%s";

    /**
     * 普通商品sku库存缓存
     */
    public static final String PRODUCT_STOCK = "product:stock:";

    /**
     * 促销活动商品sku库存缓存
     */
    public static final String PRODUCT_PROMOTION_STOCK = "product:promotion:stock:";

    public static final String ORDER_NO_INCR = "order:ord_incr";

    /**
     * 操作订单状态时先获取订单的状态锁，无锁不可操作订单状态
     */
    public static final String ORDER_STATUS_LOCK = "order:status_lock:";

    /**
     * 订单申请售后前的状态，用于用户取消是恢复
     */
    public static final String ORDER_STATUS_CACHE_BEFORE_REFUND = "order:status:cache:beforeRefund:";

    /**
     * 拼团订单的锁，得到锁可以拼团
     */
    public static final String JOIN_GROUP_ORDER_LOCK = "order:join_group_order_lock:";

    /**
     * 拼团剩余人数
     */
    public static final String GROUP_PURCHASE_DETAIL = "order:group_purchase_detail:";

    /**
     * 毫秒
     */
    public static final long WAIT_TIME = 3000L;

    /**
     * 毫秒
     */
    public static final long LEASE_TIME = 3000L;


    public static final String ORDER_REFUND_LOCK = "order:refund-lock:id:";
}
